package compiler;
import walle.compi.classe.lexer.*;
import walle.compi.classe.node.*;
import walle.compi.classe.parser.*;

import interfaz.Interfaz;

import java.io.*;

public class Compiler
{

public Compiler(){
	
		try
		{
			
			
			
		

			
		               
		    Lexer l=new Lexer(new PushbackReader(new StringReader(Interfaz.command.getText())));
		    Parser p=new Parser(l);
	        Start tree = p.parse();
            System.out.println(tree); 
            
            
		        

		        
		    tree.apply(new Translator());
		            
		    
					

            
            //Esto lo vamos a ver para el final =)
        } catch (Exception e) {
        	Helper.historyWriter(e.getMessage());
        }
			
		
	
}
}



